package com.itheima.d1_file;

import java.io.File;
import java.io.IOException;

public class FileTest3 {
    public static void main(String[] args) throws IOException {
        //创建文件
        File f1=new File("C:\\Users\\dell\\IdeaProjects\\file-io-app\\src\\ac.txt");
        System.out.println(f1.createNewFile());
        //创建一级文件夹
        File f2=new File("C:\\Users\\dell\\IdeaProjects\\file-io-app\\src\\aaa");
        System.out.println(f2.mkdir());
        //创建多级文件夹
        File f3=new File("C:\\Users\\dell\\IdeaProjects\\file-io-app\\src\\aaa\\bbb\\ccc");
        System.out.println(f3.mkdirs());
        //删除文件或者非空文件夹
        System.out.println(f1.delete());
        System.out.println(f3.delete());
    }
}
